/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.helwen.restaurantbooking.bo;

import com.helwen.restaurantbooking.datalayer.entities.TblBooking;
import com.helwen.restaurantbooking.datalayer.entities.TblTable;
import com.toedter.calendar.JDateChooser;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.swing.JComboBox;
import javax.swing.JTextField;

/**
 *
 * @author Nghiata
 */
public interface IBookingBo {

    List<TblBooking> getAllBookingInfo();

    List<TblBooking> getBookingByTable(Integer tableNumber);

    TblBooking getBookingActiveOnTable(Integer tableNumber);

    void saveOrUpdate(TblBooking tblBooking);

    void saveOrUpdate(Integer id, JTextField txtName,
            JTextField txtContact,
            JDateChooser dcDate,
            JComboBox cbxTime,
            JComboBox cbxStaffName,
            JComboBox cbxArea,
            JComboBox cbxTableNumber,
            JTextField txtNumberOfPack,
            JTextField txtRemarks, Short status);

    void inserBooking(JTextField txtName,
            JTextField txtContact,
            JDateChooser dcDate,
            Short cbxTime,
            JComboBox cbxStaffName,
            String area,
            Integer number,
            JTextField txtNumberOfPack);

    Object[][] getDateModel(String searchName, String searchContact,String columnName,String sort);

    List<String> validateInputform(Integer id, JTextField txtName, JTextField txtContact, JDateChooser dcDate,
            JComboBox cbxTime,
            JComboBox cbxArea,
            JComboBox cbxTableNumber,
            JTextField txtNumberOfPack);

    List<String> validateBookForm(JTextField txtName, JTextField txtContact, JComboBox cbxTableNumber, JComboBox cbxArea, JTextField txtNumberOfPack);

    List<TblBooking> getWaitingBooking();

    void clearHistory();

    List<TblTable> getAvailableTables(boolean isAll, boolean isNonSmokingArea, Integer selectedNumber, Date reservationDate, Short reservationTime);

    public Map<TblTable, Integer> getTablesAbleToReserve(boolean isAll, boolean isNonSmoking, Integer selectedNumber, Date reservationDate, Short reservationTime, Integer numberOfPack);
}
